Map flex fields to user-validated fields in XPS

After you have configured flex fields (on page 1) with a list of values (on page 1) in a Navis N4 client, you can map these fields to user-validated fields in Navis N4 XPS using the setting MAPUVF and configure them as required.Note: MAPUVF was designed for mapping of fields where the SPARCS container record has specific storage. That is things like grade, or any flex field. It is not designed for use with derived and calculated fields, nor fields on other objects, even if the SPARCS container list shows the attribute. As examples, do not do this:

Do not map a work instruction field, such as MSTG.

Do not map a hazard field or field depending on hazard objects, such UNNO.

If you must have something like UNNO in the USC1 field in order to do complicated filtering, then you must implement as follows:

Groovy in N4, setting the value onto a flex field.

Then map the flex field with MAPUVF

If you are unsure if the simpler mapping works, without groovy, here are the test cases to worry about:

Does XPS need to know the field, and deck correctly based on this value. If so, be sure to check the field is set in XPS. Use SSH to connect to XPS. "script #ContainerReport(cntrID,USC1)"

Do this just after XPS initializes. Then also do with a new container from N4.

Check the field value in client just after initialization from XPS. Then also check for the new container from N4.
If those all show the right value in USC1 (or USC2, etc.), ok. If not you will have to add groovy to copy to flex field, then map it.

The following table lists the N4 flex fields whose list of values can flow to XPS. These are the same flex fields that you can edit in the Container Modify dialog box in an XPS client. The second column of the table maps the available N4 flex fields to the respective attributes in XPS and their equivalent XML tag. You will need to reference this table when you configure fields for XPS.

Flex Field in N4

Attribute in XPS

XML Tag

ufvFlexString05

USRJ

kCharsUserJ

ufvFlexString06

USRK

kCharsUserK

ufvFlexString07

USRL

kCharsUserL

ufvFlexString08

USRM

kCharsUserM

ufvFlexString09

USRN

kCharsUserN

ufvFlexString10

USRO

kCharsUserO

unitFlexString11

USRE

kCharsUserE

unitFlexString12

USRF

kCharsUserF

unitFlexString13

USRG

kCharsUserG

unitFlexString14

USRH

kCharsUserH

unitFlexString15

USRI

kCharsUserI

The following procedure involves editing XPS configuration files. Typically, Navis Professional Services personnel configure these files for your site. If you do this by yourself, make sure you create backup files before you make any changes and always test your changes in a test system first.

To map flex fields to user-validated fields in XPS:

  1. Based on the table above, determine the corresponding XPS attribute for the flex field that you configured in the N4 client.

For ufvFlexString09, this would be USRN.

  1. In the xps/data folder, find the SPARCS Settings.txt file and edit it as follows:

  1. In the #SETTINGS section, add (or edit) the setting MAPUVF to map the attribute to a user-validated field. Otherwise, XPS renders the field as a text string.

See Change the SPARCS Settings.txt file for instructions on how to edit this file. For overview information, see SPARCS Settings.txt file in Navis N4: Setup, Maintenance, and System Diagnostics Guide.

For example, to map USRN to the user-validated field USC1, edit the setting as follows:

MAPUVF  Y  USRN

  1. In the #ATTRIBUTE section, specify the following information for the user-validated field:

Maximum number of characters

Whether the field is in use

Long name

Short name

For example, staying with the example above, this would be:

USC1  10  Y  Fragility   Fragile

  1. In the xps/data folder, find the settings.xml file and add the XML tags associated with the flex field to define the maximum number of characters for the field.

For example, if you added the USRN attribute (for ufvFlexString09) to the SPARCS Settings.txt file and specified the maximum number of characters as ten, then you must add the following XML tag to the settings.xml file to define the maximum length for USRN as ten:

<customer:kCharsUserN>5</customer:kCharsUserN>

In addition, if you mapped the USRN attribute to the first user-validated field using MAPUVF, you must also add the following XML tag to restrict the maximum length for the first user-validated field to ten:

<customer:kCharsUserValidated1>10</customer:kCharsUserValidated01>

  1. Restart XPS.

Any changes you make to the SPARCS Settings.txt file only take effect after you restart the application.

Restarting XPS requires that you stop operations. Carefully schedule the time to minimize disruptions.